<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:p="http://jboss.com/products/seam/pdf">
	
	<p:cell rendered="#{rendered}">
		<p:paragraph>
			<c:choose>
				<c:when test="#{type == 'Date'}">
					<p:text value="#{value}">
						<s:convertDateTime type="date"
							pattern="#{messages['DatePattern']}"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Time'}">
					<p:text value="#{value}">
						<s:convertDateTime type="both"
							pattern="#{messages['TimePattern']}"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Timestamp'}">
					<p:text value="#{value}">
						<s:convertDateTime type="time"
							pattern="#{messages['TimestampPattern']}"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Boolean'}">
					<p:text value="#{value}">
						<f:converter
							converterId="rad.framework.jsf.YesNoConverter"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Integer'}">
					<p:text value="#{value}"/>
				</c:when>
				
				<c:when test="#{type == 'Decimal'}">
					<p:text value="#{value}"/>
				</c:when>
				
				<c:when test="#{type == 'Currency'}">
					<p:text value="#{value}">
						<f:convertNumber type="currency"
							currencySymbol="#{messages['CurrencySymbol']}"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Number'}">
					<p:text value="#{value}">
						<f:convertNumber type="number"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Percent'}">
					<p:text value="#{value}">
						<f:convertNumber type="percent"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'Link'}">
					<p:text value="#{value}"/>
				</c:when>
				
				<c:when test="#{type == 'Image'}">
					<p:image value="#{value}"/>
				</c:when>
				
				<c:when test="#{type == 'Enum'}">
					<p:text value="#{value}" rendered="#{value != null}">
						<f:converter
							converterId="rad.framework.jsf.EnumOutputConverter"/>
					</p:text>
				</c:when>
				
				<c:when test="#{type == 'TextArea'}">
					<p:html>
						<s:formattedText  value="#{value}"/>
					</p:html>
				</c:when>
				
				<c:otherwise>
					<p:text value="#{value}"/>
				</c:otherwise>
			</c:choose>
		</p:paragraph>
	</p:cell>
	
</ui:composition>